package org.slicerj.core;

import java.io.IOException;
import java.net.URISyntaxException;

public class SliceExecutor {
	public SliceExecutor(String pkgName, String className, String method,
			int line, String varName) throws IllegalArgumentException,
			IOException, URISyntaxException, InterruptedException {
		String targetPkg = "";
		String targetFile = className;
		String traceDir = "traces/";
		String mainFile = className;
		String traceFile = mainFile.toLowerCase();

		// String srcPkg = "mine.";
		String mainPath = pkgName + "." + mainFile;
		String targetPath = targetPkg + targetFile;

		// String method = ".main";
		// String line = ":7";
		String vars = ":" + varName;
		// String vars = "";

		// IPath projectPath = new Path(project.getLocation());
		// SlicerActivator.createFolder(project, path + "res/traces");

		String cmd = "java -javaagent:lib/tracer.jar=tracefile:" + traceDir
				+ traceFile + " -cp bin " + mainPath + " small";

		System.out.println("Please wait... processing!");
		System.out.println("Creating trace file for " + mainPath + ".java @ "
				+ traceDir);
		ProcessExecuter process = new ProcessExecuter(cmd);
		process.execute();

	}

	public static void slice() {

	}

}
